package com.yf.dmp.dao;

import com.yf.dmp.bean.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserDao {

    public User getUserLogin(@Param("username") String username, @Param("password") String password);

    public List<User> getUser(@Param("username") String username, @Param("pageStart") int pageStart, @Param("pageSize") int pageSize);

    public int getUserCount(@Param("username") String username);

    public int updateState(@Param("id")Integer id ,@Param("state") boolean state);

    public int updatePassword(@Param("id")Integer id ,@Param("newpassword") String newpassword);

    public int addUser(User user);

    public int deleteUserById(@Param("id") int id);

    public User getUpdateUser(@Param("id") int id);

    public int updateUser(User user);
}
